import axios from '@/libs/api.request'
import { getToken } from '@/libs/util'

class GbRecord {
  constructor() {
    this.$axios = axios;
  }
  query=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/query",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }

  start=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/start",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }

  stop=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/stop",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }

  resume=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/resume",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }

  pause=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/pause",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }
  speed=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/speed",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }

  downloadStart=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/download/start",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }

  downloadStop=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/download/stop",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }

  downloadTaskAdd=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/download/stop",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }

  downloadTaskList=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/download/list",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }

  downloadTaskProgress=(param)=>{
    return axios.request({
      url: "admin/gb/video/record/download/progress",
      method: 'post',
      dataType: 'json',
      headers: {
        'Content-Type': 'application/json; charset=UTF-8',
        'token': getToken()
      },
      data: param
    })
  }
}
export default GbRecord;
